package com.jiuqi.ccp.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="COM_SCHGRP"
 *     
*/
public class ComSchgrp implements Serializable {

    /** identifier field */
    private String csGuid;

    /** nullable persistent field */
    private String schId;

    /** nullable persistent field */
    private String tbCategory;

    /** full constructor */
    public ComSchgrp(String csGuid, String schId, String tbCategory) {
        this.csGuid = csGuid;
        this.schId = schId;
        this.tbCategory = tbCategory;
    }

    /** default constructor */
    public ComSchgrp() {
    }

    /** minimal constructor */
    public ComSchgrp(String csGuid) {
        this.csGuid = csGuid;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="CS_GUID"
     *         
     */
    public String getCsGuid() {
        return this.csGuid;
    }

    public void setCsGuid(String csGuid) {
        this.csGuid = csGuid;
    }

    /** 
     *            @hibernate.property
     *             column="SCH_ID"
     *             length="15"
     *         
     */
    public String getSchId() {
        return this.schId;
    }

    public void setSchId(String schId) {
        this.schId = schId;
    }

    /** 
     *            @hibernate.property
     *             column="TB_CATEGORY"
     *             length="20"
     *         
     */
    public String getTbCategory() {
        return this.tbCategory;
    }

    public void setTbCategory(String tbCategory) {
        this.tbCategory = tbCategory;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("csGuid", getCsGuid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof ComSchgrp) ) return false;
        ComSchgrp castOther = (ComSchgrp) other;
        return new EqualsBuilder()
            .append(this.getCsGuid(), castOther.getCsGuid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getCsGuid())
            .toHashCode();
    }

}
